//
//  TestProblem1200.swift
//  LeetCodeTests
//
//  Created by 武侠 on 2023/6/25.
//  Copyright © 2023 zhulongiMac02. All rights reserved.
//

import XCTest
@testable import LeetCode

final class TestProblem1200: XCTestCase {

    var problem = Problem1200()
    
    override func setUp() {
        super.setUp()
        // Put setup code here. This method is called before the invocation of each test method in the class.
    }
    
    override func tearDown() {
        // Put teardown code here. This method is called after the invocation of each test method in the class.
        super.tearDown()
    }
    
    // MARK: - 排序
    func testProblem1200_Case1() throws {
        XCTAssertEqual(problem.minimumAbsDifference([4,2,1,3]), [[1,2],[2,3],[3,4]])
    }
    
    func testProblem1200_Case2() throws {
        XCTAssertEqual(problem.minimumAbsDifference([1,3,6,10,15]), [[1,3]])
    }
    
    func testProblem1200_Case3() throws {
        XCTAssertEqual(problem.minimumAbsDifference([3,8,-10,23,19,-4,-14,27]), [[-14,-10],[19,23],[23,27]])
    }
    
    func testProblem1200_2_Case1() throws {
        XCTAssertEqual(problem.minimumAbsDifference2([4,2,1,3]), [[1,2],[2,3],[3,4]])
    }
    
    func testProblem1200_2_Case2() throws {
        XCTAssertEqual(problem.minimumAbsDifference2([1,3,6,10,15]), [[1,3]])
    }
    
    func testProblem1200_2_Case3() throws {
        XCTAssertEqual(problem.minimumAbsDifference2([3,8,-10,23,19,-4,-14,27]), [[-14,-10],[19,23],[23,27]])
    }
}
